home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / dos / pascal / calctp.com / SAMPLE.PAS < prev   
Encoding:
Pascal/Delphi Source File  |  1989-11-04  |  1.2 KB  |  41 lines

  1. Program Sample;
  2.  
  3. Uses
  4.   Calc,
  5.   FastWr,
  6.   Crt,
  7.   Meta;
  8.  
  9.  Var Ch     : Char;
  10.  Begin
  11.   Clrscr;
  12.   BoxTint := 15;             (* Set the color of the window border.        *)
  13.   ValueTint := 15;           (* Set the Calculator result color.           *)
  14.   KillSnow := False;         (* Does Not wait for retrace when FALSE.      *)
  15.   EnhncdKeyboard := False;   (* Assumes the keyboard is 84 key; numlock set on. *)
  16.  
  17.   FastWrite('File                      Create       Report       Editor       Quit',1,1,15);
  18.   FastWrite('Calculator',1,11,112);
  19.   FastWrite('Calculation Result:',16,1,7);
  20.   Repeat
  21.   Ch := ReadKey;
  22.  
  23.   If Ch in [#13,'c','C'] then
  24.   Begin
  25.     Calculator;
  26.     FastWrite('                              ',16,21,0);
  27.     If PasteExit = True Then     (* Lets you know that the exit key was F10
  28.                                    rather than Esc.,  So a paste is required. *)
  29.       FastWrite(PasteValue,16,21,15);
  30.  
  31.          (* If PasteExit is true then
  32.          the result of a calculation
  33.          can be inserted into an
  34.          application using the value
  35.          assigned to PasteValue. *)
  36.   end;
  37.  
  38.   Until Ch in ['q','Q'];
  39.     Clrscr;
  40. end.
  41.